#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<vector>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#define rep(i,a,b) for(register int i = (a);i <= (b);++i)
#define per(i,a,b) for(register int i = (a);i >= (b);--i)  
typedef long long ll;
typedef unsigned long long ull;
using std::string;using std::cin;using std::cout;

int _,n,k,z,a[200010],sum[200010],mx[200010],ans;

int main(){
    // std::ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    //freopen("in.in", "r", stdin);
    cin >> _;
    while(_--){
        cin >> n >> k >> z;
        z = std::min(z,k/2);
        k = k + 1 , ans = 0;
        rep(i,1,n) cin >> a[i];
        rep(i,1,n) mx[i] = 0;
        rep(i,1,n) sum[i] = sum[i-1] + a[i]; 
        rep(i,2,n) mx[i] = std::max(mx[i-1],sum[i] - sum[i-2]);
        rep(i,0,z-1) ans = std::max(ans,sum[k - i*2] + mx[k - i*2] * i);
        if((k-1)/2 >= z) ans = std::max(ans,sum[k - z*2] + mx[k - z*2] * z);
        rep(i,1,z){
            ans = std::max(ans,sum[k - 2*(i-1) - 1] + mx[k - 2*(i-1) - 1]*(i-1) + sum[k - 2*(i-1) - 2] - sum[k - 2*(i-1) - 3]);
        }
        cout << ans << "\n";
    }
    return 0;
}